#ifndef PROTOCOL_H
#define PROTOCOL_H
#include <QByteArray>

namespace protocol
{
    enum Fflag
    {
        start = 0x80,
        end,
        ing
    };

    constexpr char HEAD[2] = {(char) 0xAA, (char) 0xA5};

    QByteArray writeFile(char *buf, int len, Fflag flag);

    QByteArray command(int command);

} // namespace protocol

#endif // PROTOCOL_H
